﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<nelech.Models.DBModel.SearchForumView>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    נלך- תוצאות חיפוש פורומים
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
   <div id="left">
 
  <%Html.RenderAction("AdvertShowThree", "Advert", new { id = 7 });%>
  
</div>
<div id="main">
<%if (Model == null)
  { %>
  <h2>לא נמצאו תוצאות</h2>
<%}
  else
  { %>

    <h2>
        תוצאות חיפוש פורומים</h2>
    <% Html.RenderPartial("ForumSearchControl"); %>
   
    <% foreach (var item in Model)
       {%>
    <fieldset>
        <legend>
        <%if (item.subject != null)
          {%>
            <%= Html.ActionLink(item.subject.title, "ListResponseOfCategory", new { id = item.subject.id })%></legend>
          <h3>  <%= item.forum.title%></h3>
          <%= item.forum.text%>
          <%= Html.ActionLink(item.category.title, "ListFirstResponseOfCategory", new { id = item.category.id })%>
       <%}
          else
          { %>
           <%= Html.ActionLink(item.forum.title, "ListResponseOfCategory", new { id = item.forum.id })%></legend>
            <%= item.forum.text%>
             <%= Html.ActionLink(item.category.title, "ListFirstResponseOfCategory", new { id = item.category.id })%>
    
       <%} %>
    </fieldset>
    <%}
  } %>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="publishTop" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Right" runat="server">
</asp:Content>
